package com.teocom.vet;

import java.util.ArrayList;
import java.util.List;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.OneToMany;
import javax.persistence.PrimaryKeyJoinColumn;

@Entity
@PrimaryKeyJoinColumn(name = "doc")
public class Vet extends Person{
	
	@ManyToMany
	@JoinTable(
				joinColumns = {@JoinColumn(name = "doc")},
				inverseJoinColumns = {@JoinColumn(name = "id")}			   
			  )
	private List<Specialty> specialties = new ArrayList<>();
	
	@OneToMany(targetEntity=Visit.class)
	private List<Visit> visits_vet = new ArrayList<>();
 	
	public Vet() {
		
	}

	public Vet(Integer doc, String firstName, String lastName, List<Specialty> specialties, List<Visit> visits_vet) {
		super(doc, firstName, lastName);
		this.specialties = specialties;
		this.visits_vet = visits_vet;
	}

	public List<Specialty> getSpecialties() {
		return specialties;
	}

	public void setSpecialties(List<Specialty> specialties) {
		this.specialties = specialties;
	}

	public List<Visit> getVisits_vet() {
		return visits_vet;
	}

	public void setVisits_vet(List<Visit> visits_vet) {
		this.visits_vet = visits_vet;
	}
	
	
}
